package com.southwind;

/**
 * @author south wind
 * @version 1.0
 * @date 2025/3/18 11:54
 * @description
 */
public class Rectangle {
    private double chang ;
    private double kuan ;

    public double getchang() {
        return chang;
    }

    public void setchang(double chang) {
        this.chang = chang;
    }

    public double getkuan() {
        return kuan;
    }

    public void setkuan(double kuan) {
        this.kuan = kuan;
    }

    public Rectangle() {
    }

    public Rectangle(double chang, double kuan) {
        this.chang = chang;
        this.kuan = kuan;
    }


    public double getArea(){
        return chang *kuan;
    }

    public double getPerimeter(){
        return 2*(chang+kuan);
    }
    public String getInfo(){
        return "长是："+chang+",宽是"+kuan+",面积是："+getArea()+",周长是："+getPerimeter();

    }
}
